import java.util.Scanner;

/*
  @author: 13813
  @date: 2024/11/11 9:04
*/
public class HomeWork05 {
    public static void main(String[] args) {
        //输出语句，控制台
        System.out.println("请输入用户名");
        //接收用户输入
        Scanner scanner = new Scanner(System.in);
        //用户名字符串数据
        String userName = scanner.nextLine();
        System.out.println("请输入密码");
        //密码字符串数据
        String passwd = scanner.nextLine();
        if (userName.equals("zhangsan") && passwd.equals("123")) {
            boolean flag = true;
            do {
                System.out.println("1.新增2.修改3.删除4.查询5.退出");
                String choice = scanner.nextLine();
                switch (choice) {//姓名 年龄 性别
                    case "1":
                        System.out.println("新增");
                        break;
                    case "2":
                        System.out.println("修改");
                        break;
                    case "3":
                        System.out.println("删除");
                        break;
                    case "4":
                        System.out.println("查询");
                        break;
                    case "5":
                        //改成false
                        flag = false;
                        System.out.println("退出");
                        break;
                }
            } while (flag);

        } else {
            System.out.println("登录失败");
        }
    }
}
